<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="<?= base_url() ?>">CMS <span class="goProLabel">PRO</span></a>
            <div class="nav-collapse">
                <ul class="nav">

                    <li class="dropdown <? if ($_GET['post_type'] == 'page' || $_GET['post_type'] == 'news') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Pages
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('posts/view_all?post_type=page') ?>"><i class="icon-list-alt"></i> View All Pages</a> </li>
                            <li><a href="<?= base_url('posts/view_all?post_type=news') ?>"><i class="icon-list-alt"></i> View All News</a> </li>
                            <li class="divider"></li>
                            <li><a href="<?= base_url('posts/view_edit?post_type=page&post_action=NEW') ?>"><i class="icon-pencil"></i> Add Page</a> </li>
                            <li><a href="<?= base_url('posts/view_edit?post_type=news&post_action=NEW') ?>"><i class="icon-pencil"></i> Add News</a> </li>
                        </ul>
                    </li>

                    <li class="divider-vertical"></li>

                    <li class="dropdown <? if ($page == 'Gallery') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Galleries
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('gallery/view_all?post_type=gallery&type=all') ?>"><i class="icon-list-alt"></i> View All Galleries</a> </li>
                            <li><a href="<?= base_url('gallery/view_all?post_type=gallery&type=page') ?>"><i class="icon-camera"></i> Pages Galleries</a> </li>
                            <li><a href="<?= base_url('gallery/view_all?post_type=gallery&type=news') ?>"><i class="icon-camera"></i> News Galleries</a> </li>
                            <li class="divider"></li>
                            <li><a href="<?= base_url('gallery/view_new?post_type=gallery') ?>"><i class="icon-picture"></i> Add Gallery / Images or Video</a> </li>                                  

                        </ul>
                    </li>

                    <li class="divider-vertical"></li>

                    <li class="dropdown <? if ($page == 'Document') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Documents
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('documents/view_all?post_type=document&type=all') ?>"><i class="icon-list-alt"></i> View All Folders</a> </li>
                            <li class="divider"></li>
                            <li><a href="<?= base_url('documents/view_new?post_type=document') ?>"><i class="icon-book"></i> Add Folder / Files</a> </li>                                  
                        </ul>
                    </li>

                    <li class="divider-vertical"></li>

                    <li class="dropdown <? if ($_GET['post_type'] == 'seo') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            SEO
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('seo/view_all?post_type=seo') ?>"><i class="icon-list-alt"></i> View All SEO</a> </li>
                        </ul>
                    </li>

                    <li class="divider-vertical"></li>

                    <li class="dropdown <? if ($page == 'Maillist') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Other
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('maillist/view_all?post_type=mail_list') ?>"><i class="icon-bookmark"></i>  Mail list</a> </li>
                        </ul>
                    </li>

                    <li class="divider-vertical"></li>

                    <li class="dropdown <? if ($page == 'Thumbnails' || $page == 'Words') echo 'active'; ?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Settings
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="nav-header">Thumbnails</li>
                            <li class="divider"></li> 
                            <li><a href="<?= base_url('cmssettings/view_all_thimbnail_size?post_type=thumbnails') ?>"><i class="icon-list-alt"></i> View All Thumbnails</a> </li>
                            <li><a href="<?= base_url('cmssettings/view_add_thimbnail_size?post_type=thumbnails') ?>"><i class="icon-pencil"></i> Add Thumbnail</a> </li>
                        </ul>
                    </li>
                </ul> 

                <ul class="nav pull-right">
                    
                    <li class="divider-vertical"></li>
                    
                    <li class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">User <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?= base_url('login/logout'); ?>"><i class="icon-user"></i> Logout</a></li>
                        </ul>
                    </li>
                </ul> 

                <ul class="nav pull-right clearfix" id="flags">

                    <? foreach (config_item('languages') as $key => $value): ?>        
                            <li><a href="javascript:" rel="<?= $key ?>"><img src="<?= base_url(); ?>assets/flags/<?= $key ?>.png" alt="<?= $value ?>" title="<?= $value ?>" /></a></li>
                        <? endforeach; ?> 


                </ul>
            </div>
        </div><!--/.nav-collapse -->
    </div>
</div>
</div> <!-- /navbar -->